Silently ignore info being NULL. This is unavoidable with the current
authorMatthias Clasen <mclasen@redhat.com>
Fri, 1 Oct 2004 18:56:14 +0000 (18:56 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 1 Oct 2004 18:56:14 +0000 (18:56 +0000)
2004-10-01  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes):
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear_attributes):
Silently ignore info being NULL. This is unavoidable with the
current design where we have every implementation of layout_clear
call layout_clear_attributes, and also delegate calls to dependent
cell layouts.  (#154191, Martyn Russell)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcellview.c
gtk/gtktreeviewcolumn.c

index 8aadf08eb020f3b8032a987132395968ff1e832e..e62c55184fc5b775d0088d42c2ae16dc0fc3bbce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-10-01  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes): 
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear_attributes): 
+       Silently ignore info being NULL. This is unavoidable with the 
+       current design where we have every implementation of layout_clear
+       call layout_clear_attributes, and also delegate calls to dependent
+       cell layouts.  (#154191, Martyn Russell)
+
 2004-10-01  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/iminuktitut.c: Fix the spelling of Inuktitut
index 8aadf08eb020f3b8032a987132395968ff1e832e..e62c55184fc5b775d0088d42c2ae16dc0fc3bbce 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-01  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes): 
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear_attributes): 
+       Silently ignore info being NULL. This is unavoidable with the 
+       current design where we have every implementation of layout_clear
+       call layout_clear_attributes, and also delegate calls to dependent
+       cell layouts.  (#154191, Martyn Russell)
+
 2004-10-01  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/iminuktitut.c: Fix the spelling of Inuktitut
index 8aadf08eb020f3b8032a987132395968ff1e832e..e62c55184fc5b775d0088d42c2ae16dc0fc3bbce 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-01  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes): 
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear_attributes): 
+       Silently ignore info being NULL. This is unavoidable with the 
+       current design where we have every implementation of layout_clear
+       call layout_clear_attributes, and also delegate calls to dependent
+       cell layouts.  (#154191, Martyn Russell)
+
 2004-10-01  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/iminuktitut.c: Fix the spelling of Inuktitut
index 8aadf08eb020f3b8032a987132395968ff1e832e..e62c55184fc5b775d0088d42c2ae16dc0fc3bbce 100644 (file)
@@ -1,3 +1,12 @@
+2004-10-01  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcellview.c (gtk_cell_view_cell_layout_clear_attributes): 
+       * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_layout_clear_attributes): 
+       Silently ignore info being NULL. This is unavoidable with the 
+       current design where we have every implementation of layout_clear
+       call layout_clear_attributes, and also delegate calls to dependent
+       cell layouts.  (#154191, Martyn Russell)
+
 2004-10-01  Matthias Clasen  <mclasen@redhat.com>
 
        * modules/input/iminuktitut.c: Fix the spelling of Inuktitut
index a68d03482e3ae92152fa01f635f42518102a409b..84c3bc8dd857a769ac027f7dc1f55e5d9d57d1fe 100644 (file)
@@ -706,17 +706,18 @@ gtk_cell_view_cell_layout_clear_attributes (GtkCellLayout   *layout,
   g_return_if_fail (GTK_IS_CELL_RENDERER (renderer));
 
   info = gtk_cell_view_get_cell_info (cellview, renderer);
-  g_return_if_fail (info != NULL);
-
-  list = info->attributes;
-  while (list && list->next)
+  if (info != NULL)
     {
-      g_free (list->data);
-      list = list->next->next;
+      list = info->attributes;
+      while (list && list->next)
+       {
+         g_free (list->data);
+         list = list->next->next;
+       }
+      
+      g_slist_free (info->attributes);
+      info->attributes = NULL;
     }
-
-  g_slist_free (info->attributes);
-  info->attributes = NULL;
 }
 
 static void
index eea8180433fcf4995139a3f7753e973766a749a4..686c0492204fc210e91c1f4f91d9b14bbc2d0114 100644 (file)
@@ -764,7 +764,8 @@ gtk_tree_view_column_cell_layout_clear_attributes (GtkCellLayout    *cell_layout
   column = GTK_TREE_VIEW_COLUMN (cell_layout);
 
   info = gtk_tree_view_column_get_cell_info (column, cell_renderer);
-  gtk_tree_view_column_clear_attributes_by_info (column, info);
+  if (info)
+    gtk_tree_view_column_clear_attributes_by_info (column, info);
 }
 
 static void